import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Guanli from '../views/guanli.vue'
import Xinxi from '../views/xinxi.vue'
import Xiangqing from '../views/xiangqing.vue'
const routes = [
  {
    path: '/',
    name: 'Home',
    redirect:'/management/guanli'//默认页直接重定向到你要显示的默认页
  },
  {
    path: '/management/',
    name: 'management',
    component: HomeView,
    children:[
        {
          path: 'guanli',//默认显示页路径
          name: 'Guanli',
          component: Guanli, 
        },
        {
          path: 'xinxi',
          name: 'Xinxi',
          component: Xinxi
        },
        {
          path: 'xiangqing',
          name: 'Xiangqing',
          component: Xiangqing
        }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
